package com.campus.common.enums;

public enum PointsRecordSourceEnum {
    ORDER("order", "订单"),
    EXCHANGE("exchange", "兑换"),
    SIGN("sign", "签到");

    private final String value;
    private final String text;

    PointsRecordSourceEnum(String value, String text) {
        this.value = value;
        this.text = text;
    }

    /**
     * Gets value.
     *
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * Gets text.
     *
     * @return the text
     */
    public String getText() {
        return text;
    }

    /**
     * Gets by value.
     *
     * @param value the value
     * @return the by value
     */
    public static PointsRecordSourceEnum getByValue(String value) {
        for (PointsRecordSourceEnum temp : PointsRecordSourceEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}